package com.pgytesting.secondhandcar;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.web.bind.annotation.CrossOrigin;

@CrossOrigin
@SpringBootApplication
//@ServletComponentScan(basePackages = "com.pgytesting.secondhandcar.filters.*")
public class SecondHandCarApplication extends SpringBootServletInitializer {

    /**
     * Spring Boot打包初始化入口类
     *
     * @param application spring boot的入口application class
     * @return 入口类class
     */
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(SecondHandCarApplication.class);
    }

    public static void main(String[] args) {
        SpringApplication.run(SecondHandCarApplication.class, args);
    }

}
